package algorithm.poj.p1000;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.URLDecoder;
import java.util.StringTokenizer;

/**
 * 分析：
 * P(N, M) = P(N-1, M-1)*(C-(M-1))/C + P(N-1, M+1)*(M+1)/C
 * P(N, M) = 0 (if M-N is odd or M > N or M < 0)
 * 
 * 直接递推复杂度太高，我们可以直接求解通项。
 * P(N,M) = f(N,M)/N^C
 * f(N,M) 表示N个位置中，恰好有M种颜色出现了奇数次，另C-M中颜色出现了偶数次，
 * 分析知道
 * 
 * f(N,M) = sigma (C(C,K)*sigma N!/(x_1!...x_K!)[x_i >= 1 && x_1+...+x_K=N && 恰M个奇数])[M<=K<=min(N,C)]
 * 
 * 实现：
 * 经验：
 * 教训：
 * 
 * @author wong.tong@gmail.com
 *
 */
public class P1322 {

	public static void main(String[] args) throws Exception {

		InputStream input = null;
		if (false) {
			input = System.in;
		} else {
			URL url = P1322.class.getResource("P1322.txt");
			File file = new File(URLDecoder.decode(url.getPath(), "UTF-8"));
			input = new FileInputStream(file);
		}
		
		BufferedReader stdin = new BufferedReader(new InputStreamReader(input));

		String line = stdin.readLine();
		StringTokenizer st = null;
        while (line != null && !"0".equals(line.trim())) {
        	
        	st = new StringTokenizer(line);
        	int C = Integer.valueOf(st.nextToken());
        	int N = Integer.valueOf(st.nextToken());
        	int M = Integer.valueOf(st.nextToken());
        	System.out.println(p(C, N, M));
	        line = stdin.readLine();
        }
	}
	
	private static double p(int C, int N, int M) {

		if (M < 0 || M > N || (N-M)%2 != 0) {
			return 0.0f;
		} else {
			return c((N-M)/2 + (C-1), C-1)*c(N,M)/Math.pow(N, C);
		}
	}
	
	/**
	 * n很小，m很大的情况下有效
	 * @param m
	 * @param n
	 * @return
	 */
	private static double c(int m, int n) {
		double r = 1.0;
		for (int i = 1; i <= n; i ++) {
			r *= (double)(m+i)/i;
		}
		return r;
	}
}
